import Koa from 'koa'
import { useRouter } from './instrument/useRouter/index.js'
import { sync } from "./instrument/syncDB/index.js"
import { port } from './config/index.js'
import cors from '@koa/cors'

sync()

let app = new Koa()

app.use(cors())

useRouter(app)

app.listen(port,() => console.log(`Server is runing : http://127.0.0.1:${port}`))